<%= javascript_include_tag 'pagination' %>
<table style="border:none">
    <tr>
      <td> <%= label_tag t('activerecord.attributes.customer.type') %> </td>
      <td> <%= select(:customer_type, :id, options_for_select(Customer::VALID_CUSTOMER_TYPES.map {|u| [t(u),u]}), {:prompt =>true}) %> </td>
      <td> <%= image_tag("load.gif",
            :width => 18,
            :align => "absmiddle",
            :border => 0,
            :id => "spinner",
            :style =>"display: none;") %>
      </td>
    </tr>
  
  </table>

  <table style="border:none">
    <tr>
      <td><div id="list_table"></div></td>
    </tr>
  </table>

  <%= observe_field 'customer_type_id',
      :frequency => 1,
      :update => 'list_table',
      :before => "Element.show('spinner')",
      :success => "Element.hide('spinner')",
      :url => {:controller => 'customers', :action => 'selector_list'},
      :with => "'search_type='+value"%>